Chris Pollett > Old Classes >
CS254

( Print View )

Student Corner:
  [Grades Sec1]

  [Submit Sec1]

  [Email List Sec1]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












CS254 Fall 2006Practice Midterm 1

To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes at least three times. Second and third time try to see how much you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (b) You should bring photo ID. (c) There will be more than one version of the test. Each version will be of comparable difficulty. (d) One problem (less typos) on the actual test will be from the practice test.

[Student generated midterm solutions-PDF]

1. Consider the graph with a node c which is connected to three other nodes x1,..., x3, and where each node xi is connected to an additional node yi. Show step by step how the reachability algorithm from class would decide if y1 was connected to y3.

2. Show carefully that n*(log n) is O(∑ni=1 log i).

3. Explain how to reduce in polynomial time the problem of bipartite matching to the problem of network flow. Formulate a notion of tripartite matching. Is this problem also reducible to network flow?

4. Give a diagram for a Turing Machine which complements binary strings. i.e., switches 1's to 0's and 0's to 1's. So for example, 001 becomes 110.

5. Give a linear time, 3-tape nondeterministic, Turing machine which can check whether or not an input string x is of the form yyy for some other string y.

6. Explain how to simulate a RAM on a TM.

7. A language L is many-one reducible another language L' if there is a computable function f such that for all strings x, x is in L iff f(x) is in L'. Show every recursively enumerable language is reducible to the Halting problem.

8. Consider the language L= {<M > | L(M) consists of only those binary strings with an even number of 1's}. Show this language is undecidable with and without using Rice's Theorem.

9. Consider the 3-ary boolean function which computes the parity of x1,..., x3. Write this function in both CNF and in DNF.

10. In our argument that there exists n-ary boolean functions not computed by circuits of size 2n/(2n), we assume our circuits, besides input type gates, are only over gates of type AND, OR, NOT. Suppose we added all d-ary boolean functions as gates where d is less than n. How big would d have to be before we should be concerned with our analysis?